hysop.backend.host.python.operator.poisson module

class hysop.backend.host.python.operator.poisson.PythonPoisson(Fin, Fout, variables, name=None, pretty_name=None, dump_energy=None, dump_input_energy=None, dump_output_energy=None, plot_energy=None, plot_input_energy=None, plot_output_energy=None, plot_inout_energy=None, **kwds)[source]

Bases: PoissonOperatorBase, OpenClMappable, HostOperator

Solves the poisson equation using one of the host python fft backend (fftw, numpy or scipy).

Initialize a n-dimensional Poisson operator base (using spectral methods).

Solves:

Laplacian(Fout) = Fin

Parameters:
  • Fout (Field) – Input continuous field (rhs).

  • Fin (Field) – Output continuous field (lhs), possibly inplace, same number of components as Fin.

  • variables (dict) – Dictionary of fields as keys and topology descriptors as values.

  • dump_energy (IOParams, optional, defaults to None) – Will set the default io parameter for all energy plotters.

  • dump_input_energy (IOParams, optional, defaults to None) – Dump input field energy to a custom file. Defaults to no dump.

  • dump_output_energy (IOParams, optional, defaults to None) – Dump output field energy to a custom file. Defaults to no dump.

  • plot_energy (IOParams, optional, defaults to None) – Will set the default io parameter for all energy plotters.

  • plot_input_energy (IOParams, optional, defaults to None) – Plot input field energy in a custom file. Defaults to no plot.

  • plot_output_energy (IOParams, optional, defaults to None) – Plot output field energy in a custom file. Defaults to no plot.

  • plot_inout_energy (IOParams, optional, defaults to None) – Plot input and output field energy on the same graph in a custom file. Defaults to no plot.

  • kwds (dict, optional) – Base class arguments.

apply(**kwds)

Abstract method that should be implemented. Applies this node (operator, computational graph operator…).

classmethod build_poisson_filter(dim, *args, **kwds)[source]
setup(work)[source]

Setup temporary buffer that have been requested in get_work_properties(). This function may be used to execute post allocation routines. This sets self.ready flag to True. Once this flag is set one may call ComputationalGraphNode.apply() and ComputationalGraphNode.finalize().

Automatically honour temporary field memory requests.